//
//  ZHBackAlertView.m
//  Doctor
//
//  Created by Apple on 15/12/28.
//  Copyright © 2015年 shanshan. All rights reserved.
//

#import "ZHBackAlertView.h"

@implementation ZHBackAlertView
@synthesize image,buttonYes,buttonNo;
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
-(instancetype)initWithFrame:(CGRect)frame{
    self=[super initWithFrame:frame];
    if (self) {
        [self addMychildView];
    }
    return self;
}
-(void) addMychildView{
    image=[UIImageView new];
    [image setMyFramewithX:10 andY:0 andWidth:250 andHeight:161];
    image.image=[UIImage imageNamed:@"back-alert"];
    [self addSubview:image];
    
    buttonYes=[UIButton new];
    [buttonYes setMyFramewithX:30 andY:90 andWidth:100 andHeight:40];
    [buttonYes setImage:[UIImage imageNamed:@"back-YES"] forState:UIControlStateNormal];
    [self addSubview:buttonYes];
    
    buttonNo=[UIButton new];
    [buttonNo setMyFramewithX:140 andY:90 andWidth:100 andHeight:40];
    [buttonNo setImage:[UIImage imageNamed:@"back-NO"] forState:UIControlStateNormal];
    [self addSubview:buttonNo];
}
@end
